package net.monare.mifss.lib.validators;

import org.apache.log4j.Logger;

/**
 * Created by kristan_uros on 9.4.2014.
 */
abstract public class BaseValidator {

    protected static final String alphaNumericPattern= "^[a-zA-Z0-9_]*$";

    protected static Logger logger = Logger.getLogger(BaseValidator.class);


    public boolean isEmpty(String in ){

        if( in==null || "".equals(in))return true;

        return false;
    }

    public boolean isAlphaNumeric(String s){

        if(s.matches(alphaNumericPattern)){
            return true;
        }
        return false;
    }

}
